<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="${cxt }/">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>公告管理--所有公告</title>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
	$(function() {
		$(".search1").click(function() {
			var date1 = $("input[name='onedate']").val();
			var date2 = $("input[name='twodate']").val();
			if (date1 != null && date2 != null) {
				//ajax方式
				var content = $(".content").empty();
				$.ajax({
					url : "adminAjaxNotice",
					type : "GET",
					data : {
						"date1" : date1,
						"date2" : date2
					},
					success : function(data) {
						content.html(data);
					}
				});
			}
		});

		$(".search2").click(function() {
			var title = $("input[name='title']").val();
			if (title != null) {
				//ajax方式
				var content = $(".content").empty();
				$.ajax({
					url : "adminAjaxNotice",
					type : "GET",
					data : {
						"title" : title
					},
					success : function(data) {
						content.html(data);
					}
				});
			}
		});

		$(function() {
			$(".mytab li").click(function() {
				var status = $(this).children(".status").attr("value");
				if (status != null) {
					//ajax方式
					var content = $(".content").empty();
					$.ajax({
						url : "adminAjaxNotice",
						type : "GET",
						data : {
							"status" : status
						},
						success : function(data) {
							content.html(data);
						}
					});
				}
			});
		});
	});
</script>
<style type="text/css">
* {
	margin: 0px;
	padding: 0px;
}

ul li {
	list-style: none;
}

body {
	background-color: #F4F6F7;
}

.bigbox {
	width: 1058px;
	height: 496px;
	background-color: #F4F6F7;
	margin-top: 5px;
}

.inbigbox {
	margin-left: 23px;
	margin-right: 15px;
	background-color: white;
	padding-left: 10px;
	padding-right: 10px;
	padding-bottom: 1px;
}

.top, .div_title {
	width: 1000px;
}

.div_p {
	float: left;
}

.div_search {
	text-align: center;
	line-height: 30px;
	float: left;
	margin-top: 5px;
	margin-left: 495px;
}

.div_search span {
	font-size: 14px;
}

.tagpage, .buttom {
	float: left;
	margin-top: 5px;
}

.tagpage ul li {
	list-style: none;
	float: left;
	line-height: 30px;
	width: 80px;
	text-align: center;
	border: 1px solid #E6E9EA;
	font-weight: lighter;
	background-color: #F5F8F9;
	margin-right: 10px;
}

.tagpage ul li:hover {
	background-color: #11B6B6;
	color: white;
	cursor:pointer;
}

.buttom input {
	width: 90px;
	height: 32px;
	background-color: #FF4600;
	color: white;
	border: none;
}

.content {
	width: 1000px;
	margin-top: 20px;
}

.content_table {
	text-align: center;
	font-size: 13px;
	font-weight: normal;
}

.content_table th {
	color: #62686A;
	line-height: 30px;
	font-weight: normal;
	background-color: #F4F6F7;
}

.content_table td {
	color: #555;
	line-height: 40px;
	border-top: 1px solid #E9EDED;
}

.inbigbox input {
	border-radius: 5px;
	line-height: 25px;
	border: 1px solid #E6E9EA;
	background-color: #F5F8F9;
}

.inbigbox .inputtype {
	border: none;
	border-radius: 5px;
	line-height: 27px;
	background-color: #11B6B6;
	color: white;
	width: 50px;
}

.content_list {
	width: 1000px;
	border: 1px solid red;
	margin-bottom: 20px;
	border: 1px solid #E6E9EA;
}

.list_top_div {
	float: left;
	padding-left: 80px;
	line-height: 30px;
	color: #848484;
	font-size: 14px;
}

.list_content {
	padding-left: 20px;
	line-height: 30px;
	color: #848484;
	font-size: 14px;
	border-top: 1px dashed #E6E9EA;
}
</style>
</head>

<body>
	<div class="bigbox">
		<div class="inbigbox">
			<div class="div_title">
				<div class="div_p">
					<p style="margin-left: 5px; line-height: 50px; font-size: 18px;">公告管理</p>
				</div>
				<div class="div_search" style="margin-left: 445px;">
					<span>开始日期：</span><input type="date" name="onedate" />&nbsp;&nbsp;<span>截止日期：</span>
					<input type="date" name="twodate" /> <input type="button"
						value="搜索" class="inputtype search1" />
				</div>
				<div style="clear: both;"></div>
			</div>

			<div class="top">
				<div class="tagpage">
					<ul class="mytab">
						<li><a class="status" value="0">所有公告</a></li>
						<li><a class="status" value="1">草稿箱</a></li>
						<li><a class="status" value="2">删除公告</a></li>
					</ul>
				</div>
				<div class="div_search">
					<input type="text" placeholder="请输入关键字" name="title" /> <input
						type="button" value="搜索" class="inputtype search2" />
				</div>
				<div style="clear: both;"></div>
			</div>

			<div class="content">
				<c:forEach items="${queryAllNoticeByTypes }" var="notice">
					<div class="content_list">
						<ul>
							<li>
								<div class="list_top">
									<div class="list_top_div" style="padding-left: 20px">标题：${notice.notice_title }</div>
									<div class="list_top_div">发表时间：${notice.notice_time }</div>
									<div class="list_top_div">发表人：${notice.notice_personid }</div>
									<div style="clear: both"></div>
								</div>
								<div class="list_content">正文：${notice.notice_content }</div>
							</li>
						</ul>
					</div>
				</c:forEach>

			</div>
		</div>
	</div>
</body>

</html>